package es.ats.codington.festival.Mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import es.ats.codington.festival.domain.People;
import es.ats.codington.festival.domain.Visitor;

public class PeopleMapper implements RowMapper<People>{
	public Visitor mapRow(ResultSet resultSet, int numRow) throws SQLException {
		Visitor visitor = new Visitor();
		
			visitor.setName(resultSet.getString("name"));
			visitor.setLastname(resultSet.getString("lastname"));
			visitor.setPhone(resultSet.getInt("phone"));
			visitor.setMail(resultSet.getString("email"));
			visitor.setAddress(resultSet.getString("address"));
			visitor.setDni(resultSet.getString("dni"));
return visitor;
}
}